package com.ruoyi.business.service;

import com.ruoyi.business.app.vo.AppPurchaseVo;
import com.ruoyi.business.app.vo.AppUserCouponVo;
import com.ruoyi.business.bo.HcxCarWashAddBo;
import com.ruoyi.business.bo.HcxCarWashEditBo;
import com.ruoyi.business.bo.HcxCarWashQueryBo;
import com.ruoyi.business.domain.HcxAppUser;
import com.ruoyi.business.domain.HcxCarWash;
import com.ruoyi.business.domain.HcxMerchantOrder;
import com.ruoyi.business.vo.HcxCarWashVo;
import com.ruoyi.common.core.mybatisplus.core.IServicePlus;
import com.ruoyi.common.core.page.TableDataInfo;

import javax.servlet.http.HttpServletRequest;
import java.util.Collection;
import java.util.List;

/**
 * 洗车卡设置Service接口
 *
 * @author wsdz
 * @date 2022-08-17
 */
public interface IHcxCarWashService extends IServicePlus<HcxCarWash> {
    /**
     * 查询单个
     *
     * @return
     */
    HcxCarWashVo queryById(Long id);

    /**
     * 查询列表
     */
    TableDataInfo<HcxCarWashVo> queryPageList(HcxCarWashQueryBo bo);

    /**
     * 查询列表
     */
    List<HcxCarWashVo> queryList(HcxCarWashQueryBo bo);

    /**
     * 根据新增业务对象插入洗车卡设置
     *
     * @param bo 洗车卡设置新增业务对象
     * @return
     */
    Boolean insertByAddBo(HcxCarWashAddBo bo);

    /**
     * 根据编辑业务对象修改洗车卡设置
     *
     * @param bo 洗车卡设置编辑业务对象
     * @return
     */
    Boolean updateByEditBo(HcxCarWashEditBo bo);

    /**
     * 校验并删除数据
     *
     * @param ids     主键集合
     * @param isValid 是否校验,true-删除前校验,false-不校验
     * @return
     */
    Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);

    /**
     * 导入数据
     *
     * @param hcxCarWashList 排污口水质数据
     * @return String
     */
    String importHcxCarWash(List<HcxCarWashVo> hcxCarWashList);

    /**
     * @description: 查询满足要求的优惠券
     * @author: kubilewang
     * @date: 2022/8/23 10:14
     * @param: [carWashId]
     * @Return: [carWashId]
     **/
    AppUserCouponVo queryUserCoupon(Long carWashId);

    AppPurchaseVo purchase(HttpServletRequest request, Long carWashId, Long couponId, String payType) throws Exception;

    void washCard(HcxAppUser hcxAppUser, HcxMerchantOrder hcxMerchantOrder);

}
